<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="/hdocs/style/css/login.css" type="text/css" rel="stylesheet" />
<link href="/hdocs/style/css/common.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/hdocs/jquery/js/jquery-1.8.2.js"></script>
<script type="text/javascript" src="/hdocs/style/js/common.js"></script>
<title>瓜朋网-注册页</title>
<script type="text/javascript">
$(document).ready(function() {
	$("#email").blur(function() {
		var email = $("#email").val();
		if(email==null||email==''){
			$("#email_info").html("请输入email");
			return;
		}
		$.getJSON("/auth/validateEmail.json",{email: email}, function(result) {
			$("#email_info").html(result.message);
			return;
		});
		$("#email_info").html("OK");
	});
	$("#username").blur(function() {
		var username = $("#username").val();
		if(username==null||username==''){
			$("#username_info").html("请输入用户名");
			return;
		}
		$.getJSON("/auth/validateUsername.json",{username: username}, function(result) {
			$("#username_info").html(result.message);
			return;
		});
		$("#username_info").html("OK");
	});
	$("#password").blur(function() {
		var password = $("#password").val();
		if(password==null||password==''){
			$("#password_info").html("请输入密码");
			return;
		}
		$("#password_info").html("OK");
	});
	$("#confirm").blur(function() {
		var confirm = $("#confirm").val();
		if(confirm==null||confirm==''){
			$("#confirm_info").html("请输入确认密码");
			return;
		}
		if(confirm!=$("#password").val()){
			$("#confirm_info").html("确认密码不一致，请重新输入");
			return;
		}
		$("#confirm_info").html("OK");
	});
	$("#changeImg").click(function() {
		var url = "/validateCode?code=checkcode&temp="+Math.random();
		$("#checkImg").attr("src",url);
	});
	$("#loginBtn").click(function() {
		$("#registerForm").submit();
	});
});
</script>
</head>
<body onload="alertMsg('$!errorMessage')">
	#set ($menuIndex="index") #parse("/inc/header.html")
	<div class="centent">
		<div class="cenLe">
			<form id="registerForm" action="/auth/register.jsp" method="post">
			<div class="login">
				<p class="logTit" style="color:red;">
					<img src="/hdocs/style/img/logPsa.jpg" />
				</p>
				<div class="logTex">
					<p class="saTyle">1.填写注册信息 ＞2.注册激活 ＞3.激活成功</p>
				</div>
				<div class="logTex">
					<span>Email</span><input id="email" name="email" type="text" value="$!account.email" class="logInt" />
					<p id="email_info" class="saTyle">
						#if($!email_info) 
							$!email_info
						#else 
							请填写真实邮箱
						#end 
					</p>
				</div>
				<p class="h10"></p>
				<p class="h10"></p>
				<div class="logTex">
					<span>用户名</span><input id="username" name="username" type="text" value="$!account.username" class="logInt" />
					<p id="username_info" class="saTyle">
						#if($!username_info) 
							$!username_info
						#else 
							仅支持中英文、数字、”_”、”-”、”.”
						#end 
					</p>
				</div>
				<p class="h10"></p>
				<p class="h10"></p>
				<div class="logTex">
					<span>密码</span><input id="password" name="password" type="password" value="$!account.password" class="logInt" />
					<p id="password_info" class="saTyle">
						#if($!password_info) 
							$!password_info
						#else 
							密码4-16位任意字符
						#end 
					</p>
				</div>
				<p class="h10"></p>
				<p class="h10"></p>
				<div class="logTex">
					<span>确认密码</span><input id="confirm" name="confirm" type="password" value="$!account.confirm" class="logInt" />
					<p id="confirm_info" class="saTyle">
						#if($!password_info) 
							$!password_info
						#else 
							请再输一次密码
						#end 
					</p>
				</div>
				<p class="h10"></p>
				<p class="h10"></p>
				<div class="logTex">
					<span>验证码</span>
					<input id="checkcode" name="checkcode" type="text" value="$!account.checkcode" class="logInt yanz" />
					<em class="yzNo"><img id="checkImg" width="99" height="31" src="/validateCode?code=checkcode"/></em>
					<p class="saTyle">
						看不清？<a id="changeImg" href="javascript:void(0);">换一张</a>
					</p>
				</div>
				<p class="h10"></p>
				<p class="h10"></p>
				<p class="h10"></p>
				<p class="raMber">
					<input name="isAgreement" type="checkbox" class="reLe" checked/>
					<span class="reTx">同意瓜朋网服务使用协议
					<a href="#" target="_blank">《用户注册协议》</a></span>
				</p>
				<p class="h10"></p>
				<p class="h10"></p>
				<p class="h10"></p>
				<a id="loginBtn" href="javascript:void(0);" class="loginBtn">注册</a>
			</div>
			</form>
		</div>
		<div class="cenRi">
			<div class="gpUser">
				<p class="logRia">
					已经是瓜朋网用户了<br /> <a href="/auth/login.html">请从这里直接登录>></a>
				</p>
				<p class="h10"></p>
				<p class="h10"></p>
				<p class="h10"></p>
				<p class="h10"></p>
				<p class="thres">
					<span>合作帐号登录：</span><a href="#" class="thsa"></a>
					<a href="#" class="thsb"></a><a href="#" class="thsc"></a>
				</p>
			</div>
		</div>
	</div>
	#parse("/inc/footer.html")
</body>
</html>
